package com.gang.mars.redisson.Thread;

public class Apple06Yield {

    public static void main(String[] args) {

        CustomizeYield customizeYield = new CustomizeYield();

        new Thread(customizeYield,"小明").start();
        new Thread(customizeYield,"小红").start();

    }

    static class CustomizeYield implements Runnable{

        @Override
        public void run() {

            System.out.println(Thread.currentThread().getName() + "thread start running...");

            Thread.yield();

            System.out.println(Thread.currentThread().getName() + "thread running over...");
        }
    }

}
